package com.samsung.dao.vote;

import java.util.List;
import java.util.Map;

import com.samsung.model.vote.VoteTopic;

public interface TopicMapper {
    int deleteByPrimaryKey(String tid);

    int insert(VoteTopic record);

    int insertSelective(VoteTopic record);

    VoteTopic selectByPrimaryKey(String tid);

    int updateByPrimaryKeySelective(VoteTopic record);

    int updateByPrimaryKey(VoteTopic record);

	List<VoteTopic> listNewVote(int max);

	List<VoteTopic> checkTitle(String title);

	List<VoteTopic> checkUpdateTitle(Map<String, String> data);
	
	List<Map<String, Object>> getVoteList(Map<String, Object> condition);

	Integer getVoteCount(Map<String, Object> condition);
	
	List<Map<String, Object>> getMyJoinList(Map<String, Object> condition);

	Integer getMyJoinCount(Map<String, Object> condition);
	
	Map<String, Object> getTopicById(String topicId);
	List<Map<String, Object>> getOptionList(Map<String, Object> condition);
	
	List<Map<String, Object>> getVoteResult(String topicId);
	
	Integer getMyCreateCount(Map<String, Object> condition);
	
	List<Map<String, Object>> getMyCreateList(Map<String, Object> condition);
	
	List<Map<String, Object>> getVoteResultList(String topicId);
}